<template>
	<view class="wheel">
		<view class="nav_bar" style="background-color: #FF0299;">
			<uni-nav-bar color="#FFF" left-icon="left" title="" :border='false' :fixed="true"
				background-color="transparent" @clickLeft="$native.backAction()"></uni-nav-bar>
		</view>

		<view class="nav_box"></view>

		<view class="content">
			<view class="title flex_r_around">
				<image :src="$util.prefix('generalization/generalization_title.png')"
					mode="aspectFill"></image>
			</view>

			<view class="text">
				本活动旨在鼓励用户创造有深度、高质量的短视频内容。凡参与将获取平台扶持流量。活动说明如下：
			</view>

			<view class="list flex_center">
				<view class="index">1</view>
				<view class="span">
					每消费100曝光量给自己的视频内容推广助力，可获得1次获取扶持流量的机会。
				</view>
			</view>
			<view class="list flex_center">
				<view class="index">2</view>
				<view class="span">
					每次参与活动可随机抽取90-500000的曝光量。
				</view>
			</view>
			<view class="list flex_center">
				<view class="index">3</view>
				<view class="span">
					推广带货视频不赠送获取扶持流量的机会。消费已获得的扶持流量不参与本次活动。
				</view>
			</view>
			<!-- <view class="list flex_center">
				<view class="index">4</view>
				<view class="span">
					所有扶持流量仅可对自己作品使用，有效期为7天，过期无效。
				</view>
			</view> -->
		</view>

		<view class="btn flex_r_between">
			<view class="item" @click="toPopu">
				<image :src="$util.prefix('generalization/generalization_btn1.png')"
					mode="aspectFill"></image>
			</view>
			<view class="item" @click="$util.toUrl('/pages/blindbox/wheel')">
				<image :src="$util.prefix('generalization/generalization_btn2.png')"
					mode="aspectFill"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				provider_id: 0,
				active_ids: 0,
			}
		},
		methods: {
			toPopu() {
				this.$util.toUrl(
					`/pages/generalization/generalization?provider_id=${this.provider_id || 0}&active_ids=${this.active_ids || 0}`
				)
			}
		},

		onLoad(option) {
			if (option.token && option.cid && option.terminal) {
				uni.setStorageSync('token', option.token);
				uni.setStorageSync('cid', option.cid);
				uni.setStorageSync('terminal', option.terminal);
				this.provider_id = option.provider_id || 0;
				this.active_ids = option.active_ids || 0;
			} else {
				// this.$get('user/info').then(res=>{
				// 	this.user = res.data;
				// 	uni.setStorageSync('user',res.data);
				// 	if(option.provider_id == 0){
				// 		this.provider_id = this.user.provider_id;
				// 	}else {
				// 		this.provider_id = option.provider_id;
				// 	}
				// 	this.active_ids = option.active_ids || 0;
				// })// 测试临时
				this.$util.msg('未获取到登录信息');
			}

		},
	}
</script>

<style lang="less" scoped>
	.wheel {
		background: url(https://qiniu-cdn.maeiyun.com//h5static/generalization/generalization_bg.png) 0 30rpx no-repeat;
		background-size: 100%;
		min-height: 100vh;
		background-color: #FF0299;
	}

	.content {
		width: 686rpx;
		padding: 56rpx 42rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 48rpx 0rpx rgba(255, 2, 74, 0.5), inset 0rpx 2rpx 36rpx 8rpx rgba(255, 33, 198, 0.72);
		border-radius: 64rpx;

		margin: 440rpx auto 0;

		.title {
			image {
				width: 378rpx;
				height: 44rpx;
			}
		}

		.text {
			font-weight: 600;
			font-size: 28rpx;
			color: #B50048;
			line-height: 44rpx;
			margin: 36rpx 0;
		}

		.list {
			align-items: flex-start;
			margin-bottom: 24rpx;

			.index {
				width: 48rpx;
				height: 48rpx;
				background: linear-gradient(213deg, #FFAB11 0%, #FBEDAF 100%);
				font-weight: 800;
				font-size: 32rpx;
				color: #B60647;
				line-height: 48rpx;
				text-align: center;
				border-radius: 24rpx;
				margin-right: 24rpx;
			}

			.span {
				flex: 1;
				font-weight: 500;
				font-size: 28rpx;
				color: #B50048;
				line-height: 44rpx;
			}
		}
	}

	.btn {
		padding: 40rpx 80rpx 90rpx;

		.item {
			width: 264rpx;
			height: 108rpx;

			image {
				width: 264rpx;
				height: 108rpx;
			}
		}
	}
</style>